<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Person{
            constructor (name){
                this.name = name
            }
            run(){
                console.log('Preson Run');
            }
            cook(){
                console.log('person Cook');
            }
        }

        class Student extends Person{
            constructor(name,age){
                super(name),
                this.age = age
            }
            run(){
                console.log('student run');
            }
            introduce(){
                console.log(`i am ${this.name},my age is ${this.age}`);
            }
        }

        const student = new Student('zhangsan',23)
        console.log(student);
        console.log('显式原型',Student.prototype);
        console.log('隐式原型',student.__proto__);
        student.run()
        student.introduce()

       
        // 怎么判断一个成员方法或者成员属性是不是自身拥有的  而不是继承的？
        console.log(Student.hasOwnProperty('run'));


    </script>
</body>
</html>